﻿<div id="book">
    <% _.each(CurrentBook.Authors, function(author){%>
    <h2><a href="@Url.Action(MVC.Authors.Show())/<%=author.AuthorId%>"><%=author.FirstName%> <%=author.LastName%></a></h2>
    <%});%>
    <div class="content">
        <a href="@Url.Action(MVC.Books.Index())/<%=CurrentBook.Id%>">
            <img alt="<%=CurrentBook.Name%>" src="@Url.Content("~/Uploads/")<%=CurrentBook.Avatar%>" /></a>
        <h6><a href="@Url.Action(MVC.Books.Index())/<%=CurrentBook.Id%>"><%=CurrentBook.Name%></a></h6>
        <p><%=CurrentBook.ShortDescription%></p>
         <% if(CurrentBook.IsCanRate) {%>
                        <ul class="star-rating"  data-val-bookId ="<%=CurrentBook.Id%>">
                    <%} else { %>
                        <ul class="star-rating disabled">
                    <%}%>
                        <% if(CurrentBook.Rating==1) {%>
                            <li class="one"></li>
                            <%} else if (CurrentBook.Rating==2) { %>
                            <li class="two"></li>
                            <%} else if (CurrentBook.Rating==3) { %>
                            <li class="three"></li>
                            <%} else if (CurrentBook.Rating==4) { %>
                            <li class="four"></li>
                            <%} else if (CurrentBook.Rating==5) { %>
                            <li class="five"></li>
                        <%} %>
                        <li><a href="#" data-rate-value="1" title="1 из 5" class="one-star no-link"></a></li>
                        <li><a href="#" data-rate-value="2" title="2 из 5" class="two-stars no-link"></a></li>
                        <li><a href="#" data-rate-value="3" title="3 из 5" class="three-stars no-link"></a></li>
                        <li><a href="#" data-rate-value="4" title="4 из 5" class="four-stars no-link"></a></li>
                        <li><a href="#" data-rate-value="5" title="5 из 5" class="five-stars no-link"></a></li>
                    </ul>
        <a class="content" href="@Url.Content("~/Uploads/")<%=CurrentBook.FileName%>">Скачать</a>
    </div>
</div>
<div id="responses">

</div>